using System;
using System.Collections.Generic;
using System.Text;

namespace IGlobalist.Cms.Model
{
    [Serializable]
    public class Template : CmsObject, ITemplate
    {

        #region ITemplate Members
        private TemplateType _Type = TemplateType.NVelocity;
        public TemplateType Type
        {
            get
            {
                return (TemplateType) Enum.Parse(typeof(TemplateType) ,(string)this.GetExtPropertyValue("Type"));
            }
            set
            {
                this.SetExtPropertyValue("Type", value);
            }
        }
        public string TemplateContent
        {
            get { return (string)this.GetExtPropertyValue("TemplateContent"); }
            set
            {
                this.SetExtPropertyValue("TemplateContent", value);
            }
        }
        #endregion

        #region IXml Members

        public bool FromXml(string xml)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public string ToXmlString()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        #endregion

        #region ICmsObject Members

        public bool FromCmsObject(ICmsObject obj)
        {
            return base.FromCmsObject(obj);
        }

      
        #endregion
    }
}
